#include "Wheel.h"
#include "SDL.h"
#define _USE_MATH_DEFINES
#include <cmath>

#include "PlayState.h"

#include <SDL_OpenGL.h>
#include <GL/glut.h>

Wheel::Wheel()
{
	//m_acc = 0;
	//m_angle = 270.0f;
	//m_moving = true;
	//m_rotating = true;
	//m_speedPressed = 0;
	//m_keyBoardMovingUp = false;
	//m_keyBoardMovingDown = false;
	//m_keyBoardRotating = false;
}
void Wheel::Update()
{


}
bool Wheel::Load(const std::string& filename)
{
	m_flWheel.Load(filename);

	return true;
}
void Wheel::Draw()
{

	//glmDraw(m_Wheel, GLM_SMOOTH | GLM_TEXTURE);
	glPushMatrix();
	glColor3f(1.0f, 1.0f, 1.0f);
	//translate to the position of the car (plus 2 in y so that we can make sure its there)
	glTranslatef(TheCar::Instance()->GetPos().GetX(),TheCar::Instance()->GetPos().GetY()+2,TheCar::Instance()->GetPos().GetZ()); 
	//glTranslatef(m_pos.GetX(), m_pos.GetY(), m_pos.GetZ());
	glRotatef(m_angle,0,1,0);//change this angle to degrees
	
	//m_flWheel.Load("HiluxWheelLeft.obj");

	//m_flWheel.Draw();
	//glColor3f(0.4f, 0.7f, 0.7f);
	//m_flWheel.~GlmMesh();

	glPopMatrix();
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
}
